using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class MEM_HEAPMap : EntityTypeConfiguration<MEM_HEAP>
    {
        public MEM_HEAPMap()
        {
            // Primary Key
            this.HasKey(t => t.MEM_HEAP_ID);

            // Properties
            this.Property(t => t.MEM_HEAP_Name)
                .HasMaxLength(100);

            this.Property(t => t.MEM_HEAP_Value)
                .HasMaxLength(100);

            this.Property(t => t.MEM_HEAP_Type)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("MEM_HEAP");
            this.Property(t => t.MEM_HEAP_ID).HasColumnName("MEM_HEAP_ID");
            this.Property(t => t.MEM_HEAP_Name).HasColumnName("MEM_HEAP_Name");
            this.Property(t => t.MEM_HEAP_Value).HasColumnName("MEM_HEAP_Value");
            this.Property(t => t.MEM_HEAP_Type).HasColumnName("MEM_HEAP_Type");
            this.Property(t => t.MEM_TABLE_Session).HasColumnName("MEM_TABLE_Session");
        }
    }
}
